﻿using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace XinGuanERP.Models.Po.system
{
    public class Dict : PrivateCommonEntity<string>, IEntityTypeBuilder<Dict>
    {
        public string? Name { get; set; }
        public string? Code { get; set; }
        public string? Desc { get; set; }

        public void Configure(EntityTypeBuilder<Dict> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
            entityBuilder.ToTable("BASE_DICT");
            entityBuilder.HasKey(t => t.Id);
            entityBuilder.Property(t => t.Id).HasColumnName("ID");
            entityBuilder.Property(t => t.Name).HasColumnName("NAME");
            entityBuilder.Property(t => t.Code).HasColumnName("CODE");
            entityBuilder.Property(t => t.Desc).HasColumnName("DESC");
            entityBuilder.Property(t => t.CreateUserId).HasColumnName("CREATEUSERID");
            entityBuilder.Property(t => t.CreateUserName).HasColumnName("CREATEUSERNAME");
            entityBuilder.Property(t => t.UpdateUserId).HasColumnName("UPDATEUSERID");
            entityBuilder.Property(t => t.UpdateUserName).HasColumnName("UPDATEUSERNAME");
            entityBuilder.Property(t => t.CreateTime).HasColumnName("CREATETIME");
            entityBuilder.Property(t => t.UpdateTime).HasColumnName("UPDATETIME");
        }
    }
}
